{php include wl_template('common/header-base')}

<!-- 判断是否填写手机号 -->
{if $checkmobile['mobile'] ==""}
<style>
	.closeBtn{ font-family:arial; font-size:24px;color:#999; text-decoration:none; float:right; display: inline-block;width:36px;height:36px;line-height:36px;color:#333;text-align:center;position:absolute;top:0px;right:0px;color:#bbb;}
	.closeBtn:hover{text-shadow:0px 1px 3px #333;color:#333;}
	.zhezhao 
{ 
 width:100%; 
 height:100%; 
 background-color:#000; 
 filter:alpha(opacity=50); 
 -moz-opacity:0.5; 
 opacity:0.5; 
 position:fixed; 
 left:0px; 
 top:0px; 
 z-index:3; 
 display: none;
} 
</style>
<!-- <div id="ShowAD" style="position:fixed;width:1000px; z-index:999; height:400px; z-index:100; left:50%; top:50%;margin-left:-500px; margin-top:-200px; background: #fff;"> 
<div style="width:1000px; height:400px; box-shadow: 0 5px 15px rgba(0,0,0,.5); padding: 30px; line-height: 24px; font-size:14px; text-align:left; background: #fff;">
<a class="closeBtn" style="position: absolute;right:0px;" onclick="$('#ShowAD').hide();$('#zhezhao').hide();"><font color="ff0000">x</font></a>
<h3 style="text-align: center;margin-bottom: 40px;">来自乐享拼购的一封信</h3>
<div class="lay-header" style="margin-bottom: 20px;">亲爱的用户，您好！<br>经检测，您尚未填写您的手机号码信息，这将导致您短信相关服务发生问题，为了让您获得更好的服务体验，现需要您补充填写您的手机号码信息，请在下方进行补充，谢谢合作！</div>
<div class="lay-body" style="margin-bottom: 20px;">
	<div class="row" style="padding-left: 15px;">
		<div class="input-group col-md-4" style="float: left;">
		  <span class="input-group-addon" style="width: 82px;">手机号码</span>
		  <input type="text" id="addmobile" name="addmobile" class="form-control" placeholder="在此输入您的手机号码" onkeyup="this.value=this.value.replace(/\D/g,'')">
		</div>
		<div class="col-md-4" style="float: left;">
			<input type="button" value="点击获得验证码" id="getCord" class="btn btn-primary btn-block" style="width:140px;background-color:#42b0e9" />
		</div>
		<div class="clearfix"></div>
		<div class="input-group col-md-6" style="float: left; margin-top: 20px;">
		  <span class="input-group-addon" style="width: 82px;">验证码</span>
		  <input name="code1" type="text" class="form-control" placeholder="请输入验证码" style="width:30%;display:inline;margin-right:17px">
		</div>
		<div style="position:relative;overflow:visible;">
			<input name="smscode" value="" type="hidden"  />
		</div>
	</div>
	
</div>
<div class="clearfix"></div>
<div class="lay-footer" style="text-align: center;">
	<button class="btn btn-primary btn-block" type="button" style="width:70px; margin: 0 auto; background-color:#42b0e9" id="seekTel" onclick="upmobile()">提交  </button>
</div>
</div> 
</div>

<div class="zhezhao" id="zhezhao" style="display: block;"></div> -->

<script type="text/javascript"> 
var bodyfrm = ( document.compatMode.toLowerCase()=="css1compat" ) ? document.documentElement : document.body; 

var checkXin = false;
var smscode= document.querySelector("input[name='smscode']");
var statuse = document.getElementById("status");
var url = "{php echo url('user/register')}";
var getCord = document.getElementById("getCord");
getCord.onclick = function (ev) {
	if (getCord.value == '点击获得验证码' || getCord.value == '发送失败' ){
		ajaxData(0, url);
	}
	else {
		var num = document.querySelector('input[name="code1"]').value;
		ajaxData(num, url);
	}
	
}
function ajaxData(num, url) {
	var mobile = document.querySelector("input[name='addmobile']").value;
	if (!/\d{11}/.test(mobile)) {
		alert("手机号码不正确");
		return false;
	}
	var xhr = new XMLHttpRequest();
	var formData = new FormData();

	formData.append('num', num);
	if (num == 0){
		formData.append("mobile", mobile);
		formData.append('register', 1);
	}
	else if (num.length == 6){
		formData.append('register', 2);
	}
	else {
		alert("验证码不正确");
		return false;
	}
	xhr.open('post', url, true);
	xhr.send(formData);
	xhr.onreadystatechange = function() {

		if (xhr.readyState ==4) {

		    if ((xhr.status >=200 && xhr.status<300) || xhr.status ==304){
		    	
			    var res=JSON.parse(xhr.responseText);

			    if(res['status']==1)
			    { 
					smscode.value=res['code'];
					var a=60;
					var timp=setInterval(function(){
						a--;
						getCord.value = a+'秒';
						if(a==0){
							getCord.value = "重新发送验证码";
							clearInterval(timp);
						}
					},1000);
				}
			}			  
		}
	}
}

function upmobile(){
	
	var mobile= $("#addmobile").val();
	var num = document.querySelector('input[name="code1"]').value;

	if (num!=smscode.value) {
		util.tips('手机验证码有误！', 3000);
		return false;
	}
	if(mobile==""){
		util.tips('您输入的手机号码为空，请重新填写正确的号码！', 3000);
		return false;
	}
	 $.ajax({
         type: "GET",
         url: "{php echo web_url('agent/examine',array('op' => 'addmobile'))}",
         data:{"mobile":mobile},
		 dataType: "json",
         success: function(data){	

			util.tips('谢谢您的合作', 4000);
			$('#ShowAD').hide();
			$('#zhezhao').hide();
		 }
    });
}
</script> 


{/if}
	<div class="row" style="border-top: 4px solid #44b549;background-color: #fff;border-bottom: 1px solid #d9dadc;">
		<div class="col-xs-12 col-sm-3 col-lg-2" style="padding:8px;">
			<img style="margin-left:20px; height:42px;" src="{TG_URL_WRES}images/pintuan_logo.png">
			<!-- <div style="height: 60px;background: transparent url({TG_URL_WRES}images/pintuan_logo.png) center center no-repeat;background-color: white;"></div> -->
		</div>
		<div class="col-xs-12 col-sm-9 col-lg-10">
			<div class="navbar navbar-default" style="margin-bottom: 0px;background-color: #FFFFFF;border-color: #FFFFFF;border: 0px solid transparent;">
				<div class="container-fluid">
				<ul class="nav navbar-nav" style="font-size:16px;">
					
					{loop $top_menus $topmenus}
					<li {if $_GPC['do'] == $topmenus['active']}class="active"{/if}><a href="{$topmenus['url']}">{$topmenus['title']}</a></li>
					{/loop}
			    </ul>
				<ul class="nav navbar-nav navbar-right">
					<li><a title ="{if $acct['vip'] == 1}VIP用户{/if} {if $acct['ordernum']>0&&$acct['vip'] == 0}按量付费用户{/if}"  href="javascript:void(0);" style="display:block; max-width:165px; text-align: center;  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; ">
					{if $acct['vip'] == 1}<img style="height: 12px;" src="{TG_URL_WRES}images/icon_vip.jpg">{/if}{if $acct['ordernum']>0&&$acct['vip'] == 0}<img style="height: 18px;" src="{TG_URL_WRES}images/icon_order.png">{/if}
					{if $acct['ordernum']==0&&$acct['vip'] == 0}<img src="{php echo tomedia('headimg_'.$_W['acid'].'.jpg')}?time={php echo time()}" class="img-responsive img-thumbnail" width="30" onerror="this.src='resource/images/gw-wx.gif'"/>{/if}<span style="margin-left: 2px;">{$acct['name']}</span>
					</a></li>
					
					<li class="dropdown">
						<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" style="display:block; max-width:185px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; "><i class="fa fa-user"></i>  {$_W['user']['username']} ({if $_W['role'] == 'founder'}系统管理员{elseif $_W['role'] == 'manager'}公众号管理员{else}公众号操作员{/if}) <b class="caret"></b></a>
						<ul class="dropdown-menu">
						
							<li><a href="{url 'user/profile/profile'}" target="_blank"><i class="fa fa-weixin fa-fw"></i> 我的账号</a></li>
							{if $_W['role'] != 'operator'}
						<!--	<li class="divider"></li>
							<li><a href="{url 'system/welcome'}" target="_blank"><i class="fa fa-sitemap fa-fw"></i> 系统选项</a></li>
							<li><a href="{url 'system/welcome'}" target="_blank"><i class="fa fa-cloud-download fa-fw"></i> 自动更新</a></li>
							<li><a href="{url 'system/updatecache'}" target="_blank"><i class="fa fa-refresh fa-fw"></i> 更新缓存</a></li>
							<li class="divider"></li>-->
							{/if}
							{if $_W['role'] != 'operator'}
							<li><a href="{url 'account/post' array('uniacid' => $_W['uniacid'])}" target="_blank"><i class="fa fa-weixin fa-fw"></i> 编辑当前账号资料</a></li>
							{/if}
							<li><a href="{url 'user/logout'}"><i class="fa fa-sign-out fa-fw"></i> 退出系统</a></li>
						</ul>
					</li>
				</ul>
				</div>
			</div>
		</div>
	</div>
	
						
					
	<div class="container-fluid" style="margin-top: 18px;width: 1400px;margin-bottom: 88px;min-height: 700px;">
		<div style="padding-left: 2px;padding-bottom: 12px;">
			<span style="float: left;">通知：</span><div id="up_zzjs">
					<div id="marqueebox">
						
						{loop $notification $notification_list}
						<div id="up_li"><a href="{php echo web_url('gzhset/notification-list',array('op' => 'content','id' => $notification_list['id']))}" ><span style="color:#FF0000">{$notification_list['title']}</span></a> </div>
						{/loop}
						
					</div>
				</div>
						
							<script language="javascript">
							function startmarquee(lh,speed,delay) {
							var p=false;
							var t;
							var o=document.getElementById("marqueebox");
							o.innerHTML+=o.innerHTML;
							o.style.marginTop=0;
							o.onmouseover=function(){p=true;}
							o.onmouseout=function(){p=false;}
							function start(){
							t=setInterval(scrolling,speed);
							if(!p) o.style.marginTop=parseInt(o.style.marginTop)-1+"px";
							}
							function scrolling(){
							if(parseInt(o.style.marginTop)%lh!=0){
							o.style.marginTop=parseInt(o.style.marginTop)-1+"px";
							if(Math.abs(parseInt(o.style.marginTop))>=o.scrollHeight/2) o.style.marginTop=0;
							}else{
							clearInterval(t);
							setTimeout(start,delay);
							}
							}
							setTimeout(start,delay);
							}
							startmarquee(20,20,4000);
							</script>
		</div>
		
		{if defined('IN_MESSAGE')}
		<div class="jumbotron clearfix alert alert-{$label}">
			<div class="row">
				<div class="col-xs-12 col-sm-3 col-lg-2">
					<i class="fa fa-5x fa-{if $label=='success'}check-circle{/if}{if $label=='danger'}times-circle{/if}{if $label=='info'}info-circle{/if}{if $label=='warning'}exclamation-triangle{/if}"></i>
				</div>
				<div class="col-xs-12 col-sm-8 col-md-9 col-lg-10">
					{if is_array($msg)}
						<h2>MYSQL 错误：</h2>
						<p>{php echo cutstr($msg['sql'], 300, 1);}</p>
						<p><b>{$msg['error'][0]} {$msg['error'][1]}：</b>{$msg['error'][2]}</p>
					{else}
					<h2>{$caption}</h2>
					<p>{$msg}</p>
					{/if}
					{if $redirect}
					<p><a href="{$redirect}">如果你的浏览器没有自动跳转，请点击此链接</a></p>
					<script type="text/javascript">
						setTimeout(function () {
							location.href = "{$redirect}";
						}, 3000);
					</script>
					{else}
						<p>[<a href="javascript:history.go(-1);">点击这里返回上一页</a>] &nbsp; [<a href="./?refresh">首页</a>]</p>
					{/if}
				</div>
		{else}
		<div class="row">
			{php $frames = empty($frames) ? $GLOBALS['frames'] : $frames; _calc_current_frames2($frames);}
			{if !empty($frames)}
				<div class="col-xs-12 col-sm-3 col-lg-2 big-menu" style="padding-right: 0px;">
					{loop $frames $k $frame}
					<div class="panel panel-default">
						<div class="panel-heading">
							<h4 class="panel-title">{$frame['title']}</h4>
						</div>
						<ul class="list-group collapse in" id="frame-{$k}">
							{loop $frame['items'] $link}
							{if !empty($link['append'])}
							<li class="list-group-item {$link['active']}" onclick="window.location.href = '{$link['url']}';" style="cursor:pointer;padding-left: 40px;" kw="{$link['title']}">
								{$link['title']}
								<a class="pull-right" href="{$link['append']['url']}">{$link['append']['title']}</a>
							</li>
							{else}
							<a class="list-group-item {$link['active']}" href="{$link['url']}" kw="{$link['title']}" style="padding-left: 40px;">{$link['title']}</a>
							{/if}
							{/loop}
						</ul>
					</div>
					{/loop}
				</div>
				<div class="col-xs-12 col-sm-9 col-lg-10">
				
				<style>
					.topNav{border-bottom-color: rgb(0, 0, 0);border-bottom-width: 0.1em;border-bottom-style: inset;}
					.panel-heading {padding: 14px 15px;}
					.panel>.list-group .list-group-item {border-width: 0px 0;}
					.panel-title {color: #8d8d8d;}
					.navbar-nav>li>a {line-height: 30px;}
					body {min-width: 1400px;background: #e7e8eb;overflow-x:hidden;}
					.list-group .list-group-item.active{background-color:#44b549;border-color:#44b549;}
					.home .footer a:hover{color:#44b549;}
					.nav.nav-tabs{border-color:#dddddd;}
					.nav-tabs>li>a:hover{border-color:#eee #eee #44b549 #eee;}
					.nav-tabs>li.active>a, .nav-tabs>li.active>a:hover, .nav-tabs>li.active>a:focus{background-color:#44b549; border-color:#44b549;}
					.ex-button{float:right !important;}
					.ex-button a{cursor:pointer;background-color:#ec971f;border-color:#d58512; color:#fff !important;}
					.ex-button a:hover{background-color:#f0ad4e !important;border-color:#eea236 !important;}
					.ex-b-lastA{margin-right: 0 !important;}
					
					.modal-dialog .avatar-browser{color:#44b549;}
					.modal-dialog .avatar-browser .thumbnail:hover{border-color:#44b549;}
					.modal-dialog .avatar-browser{color:#44b549;}
					.modal-dialog .avatar-browser .thumbnail:hover{border-color:#44b549;}
					.notice-show h5{color:#44b549; border-left:3px solid #44b549; padding-left:15px;}
					.nav-tabs>li>a {color: black;border-radius: 0 0 0 0;}
					.nav{background-color: white;}
					#tips-container {position: fixed;top: 50%;left: 0;width: 100%;display: none;z-index: 99999;}
					#tips-container span {display:inline-block; padding:10px 40px; background:rgba(0,0,0,0.8); color:#fff; border-radius:4px;}
					a, a:hover, a:focus { text-decoration: none; cursor: pointer;}
					thead {background-color: #f4f5f9;}
					.table>thead>tr>th {border-bottom: 0px solid #ddd;}
					/*util.popover*/
					.mall-popover{position:absolute; top: 0; left: 0; z-index: 1060; padding: 9px 14px; text-align: left; white-space: normal; background-color: #fff; -webkit-background-clip: padding-box; background-clip: padding-box; border: 1px solid rgba(0,0,0,.2); border-radius: 6px; -webkit-box-shadow: 2px 1px 3px rgba(0,0,0,.2); box-shadow: 2px 1px 3px rgba(0,0,0,.2)}
					.mall-popover .arrow,.mall-popover .arrow:after{width: 0; height: 0; border-style: solid; position: absolute;}
					.mall-popover .arrow:after{content: "";}
					.mall-popover.top .arrow,.mall-popover.top .arrow:after{border-width: 10px 8px 0 8px; border-color:rgba(0,0,0,.2) transparent  transparent transparent; left: 50%; bottom:-11px; margin-left:-9px;}
					.mall-popover.top .arrow:after{border-top-color: #fff; left:1px; top: -12px;}
					.mall-popover.right .arrow,.mall-popover.right .arrow:after{border-width: 8px 10px 8px 0; border-color: transparent rgba(0,0,0,.2) transparent transparent; left: -11px; top: 50%; margin-top:-8px;}
					.mall-popover.right .arrow:after{border-right-color: #fff; left: 2px; top:0;}
					.mall-popover.bottom .arrow,.mall-popover.bottom .arrow:after{border-width: 0 8px 10px 8px; border-color:transparent transparent rgba(0,0,0,.4) transparent; left: 50%; top:-11px; margin-left:-9px;}
					.mall-popover.bottom .arrow:after{border-bottom-color:#fff; left:1px; top:1px;}
					.mall-popover.left .arrow,.mall-popover.left .arrow:after{border-width: 8px 0 8px 10px; border-color: transparent transparent transparent rgba(0,0,0,.2); right:-11px; top: 50%; margin-top:-8px;}
					.mall-popover.left .arrow:after{border-left-color: #fff; left: -12px; top: 0px;}
					.mall-popover.top{margin-bottom:10px;}
					.mall-popover.right{margin-left:10px;}
					.mall-popover.bottom{margin-top:10px;}
					.mall-popover.left{margin-right:10px;}
					.btn.min-width {min-width: 104px;}
					.scrollLoading{background:url({TG_URL_WRES}images/loading.gif) no-repeat center center;}
					.navbar-default .navbar-nav>.active>a, .navbar-default .navbar-nav>.active>a:hover, .navbar-default .navbar-nav>.active>a:focus {color: #f60;background-color: #e7e7e7;border-bottom: 2px solid transparent;border-color: #f60;}
				</style>
			{else}
				<div>
			{/if}
		{/if}
		